package org.tissou.client.Services;

import com.google.gwt.user.client.rpc.ServiceDefTarget;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.core.client.GWT;

/**
 * Created by IntelliJ IDEA.
 * User: Claire
 * Date: 03/03/2009
 * Time: 21:12:32
 * To change this template use File | Settings | File Templates.
 */
public interface NouvelleCategorieService extends RemoteService {
  void CreerNouvelleCategorie(String nom, CategorieInfos parent) throws MonException;

  /**
   * Utility/Convenience class.
   * Use NouvelleCategorieService.App.getInstance() to access static instance of NouvelleCategorieServiceAsync
   */
  public static class App {
    private static final NouvelleCategorieServiceAsync ourInstance;

    static {
      ourInstance = (NouvelleCategorieServiceAsync) GWT.create(NouvelleCategorieService.class);
      ((ServiceDefTarget) ourInstance).setServiceEntryPoint(GWT.getModuleBaseURL() + "NouvelleCategorieService");
    }

    public static NouvelleCategorieServiceAsync getInstance() {
      return ourInstance;
    }
  }
}
